<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .top{
            width: 200px;
            height: 400px;
            background: #333;
            margin: 100px;
            position: relative;
        }
       .top::before{
           content: "";
           display: block;
           width: 0;
           height: 0;
           border: 20px solid transparent;
           border-bottom-color: #333;
           position: absolute;
           z-index: 100;
           top: -40px;
           left: 50%;
           transform: translate(-50%);
       }
    </style>
</head>
<body>
    <div class="top">

    </div>
   
</body>
</html>